package cn.boat.router.consumer;

import java.util.ArrayList;
import java.util.List;

public class TopicWithPartitionData implements Comparable<TopicWithPartitionData>{
    private String topic;
    private List<PartitionData> partitionDataList;

    public TopicWithPartitionData() {
        topic ="";
        partitionDataList =new ArrayList<>();
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public List<PartitionData> getPartitionDataList() {
        return partitionDataList;
    }

    public void setPartitionDataList(List<PartitionData> partitionDataList) {
        this.partitionDataList = partitionDataList;
    }

    @Override
    public String toString() {
        return "TopicWithPartitionData{" +
                "topic='" + topic + '\'' +
                ", partitionDataList=" + partitionDataList +
                '}';
    }

    @Override
    public int compareTo(TopicWithPartitionData o) {
        int s = this.topic.compareTo(o.topic);
        return s;
    }
}
